#pragma once

#include <list>

#include <SFML/Graphics/Sprite.hpp>

namespace sf { class Input; }

class Player : public sf::Sprite
{
public:
    static const int Height = 10;
    static const int Width = 10;

    static const sf::Vector2f MaxSpeed;
    Player(const sf::Input &input);
    ~Player(void);

    void update(float elapsedTime);

    void goUpward() { if (m_speed.y > 0 ) m_speed.y *= -1; }

protected:
    std::list<sf::Vector2f> m_positions;
    sf::Vector2f m_speed;
    const sf::Input &m_input;

private:
    void Render(sf::RenderTarget &target) const;
};
